{% extends 'layout.html' %}

{% block head %}
<link rel="stylesheet" href="/blog/static/css/dashboard/post.css" type="text/css">
<link rel="stylesheet" href="/blog/static/css/dashboard/site.css" type="text/css">
{% endblock %}

{% block foot %}
<script src="/blog/static/js/dashboard/user_list.js" type="text/javascript"></script>
{% endblock %}

{% block content %}
	{% include 'bread.html'%}
	<div class="view-content">
	<div class="view-content-container table-responsive">
		<table class="table table-striped table-condensed">
	      <thead>
	        <tr>
	          <th class="">id</th>
	          <th class="">姓名</th>
	          <th class="">昵称</th>
	          <th class="">综合信息</th>
	          <th class="">权限</th>
	          <th class="">操作</th>
	        </tr>
	      </thead>
	      <tbody id="userBody">
	      	{% for user in users%}
	        <tr>
	          <th scope="row">{{ user.id }}</th>
	          <th>{{ user.name }}</th>
	          <th>{{ user.nickname }}</th>
	          <th>
	          	<div><i class="icon-github"></i><a href="{{ user.github }}"> {{ user.github }}</a></div>
	          	<div><i class="icon-envelope-alt"></i><a href="emailto:{{ user.email }}"> {{ user.email }}</a></div>
	          	<div><i class="icon-home"></i><a href="{{ user.blog }}"> {{ user.blog }}</a></div>
	          </th>
	          <th>{% if user.isAuthor %}作者{% endif %} {% if user.isAdmin %}管理员{% endif %}</th>
	          <td>
	          	{% if !user.isAuthor %}<a href="#" class="author-add" data-id="{{ user.id }}">设置为作者</a><span> | </span>{% else%}<a href="#" class="author-delete" data-id="{{ user.id }}">删除作者</a><span> | </span>{% endif %}<a href="#" class="delete" data-id="{{ user.id }}">删除</a></td>
	        </tr>
	        {% endfor %}
	      </tbody>
	    </table>
	</div>
	</div>
{% endblock %}
